package com.wanchuang.qhbb.view.treeopen;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;
import com.chad.library.adapter.base.entity.node.NodeFooterImp;
import com.wanchuang.qhbb.proto.AgentPolicy;

import java.util.List;


public class FirstNode extends BaseExpandNode implements NodeFooterImp  {

    private List<BaseNode> childNode;
    private AgentPolicy.modify_policy_log data;


    public FirstNode(List<BaseNode> childNode, AgentPolicy.modify_policy_log data) {
        this.childNode = childNode;
        this.data = data;
        setExpanded(false);
    }

    public AgentPolicy.modify_policy_log getPolicyLog() {
        return data;
    }

    /**
     * 重写此方法，返回子节点
     */
    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        return childNode;
    }

    @org.jetbrains.annotations.Nullable
    @Override
    public BaseNode getFooterNode() {
        return new ThreeNode();
    }
}
